package Hash;

import java.util.HashSet;
import java.util.Set;

/**
 * @Author: Darven
 * @CreateTime: 2025-03-31  18:53
 * @Description: TODO
 */
public class P3 {

}

class P3Demo{
    public int lengthOfLongestSubstring(String s) {
        Set<Character> set=new HashSet<>();
        for(int i=0;i<s.length();i++){
            if(set.contains(s.charAt(i))){
                return 0;
            }
        }
        return 0;
    }


}
